<template>
    <div :class="child == '' ? 'comment_item child' : 'comment_item'">
        <div class=" left">
            <img src="http://q1.qlogo.cn/g?b=qq&amp;nk=2998524835@qq.com&amp;s=640" alt="">
        </div>
        <div class="right">
            <p class="author">小柯</p>
            <p class="content">
                不错嘛不错嘛不错嘛不错嘛不错嘛不错嘛不错嘛不错嘛不错嘛不错嘛不错嘛不错嘛不错嘛不错嘛不错嘛不错嘛不错嘛不错嘛不错嘛不错嘛不错嘛不错嘛不错嘛不错嘛不错嘛不错嘛不错嘛不错嘛不错嘛不错嘛不错嘛不错嘛不错嘛不错嘛不错嘛不错嘛不错嘛不错嘛不错嘛不错嘛不错嘛不错嘛不错嘛不错嘛不错嘛不错嘛
            </p>
            <span class="data">2023-03-20</span>
            <span class="reply">回复</span>
        </div>
    </div>
</template>

<script lang="ts" setup>

interface Props {
    child?: any
}

const pro = defineProps<Props>();

</script>

<style lang="less" scoped>
.comment_item {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    padding: 10px 0;
    margin: 15px 0;

    .left {
        width: 50px;
        height: 50px;

        img {
            width: 100%;
            height: 100%;
            border-radius: 50%;
        }

    }

    .right {
        flex: 1;
        margin-left: 10px;
        color: var(--info-color);

        .content {
            font-size: 14px;
            margin: 10px 0;
            line-height: 25px;
        }

        .data {
            font-size: 12px;
        }

        .reply {
            font-size: 12px;
            margin-left: 20px;
            cursor: pointer;
            opacity: 0;
            transition: opacity .1s;

            &:hover {
                color: #379eff;
            }
        }
    }

    &:hover>.right .reply {
        opacity: 1;
    }
}

.child {
    margin-left: 50px;
}
</style>